﻿namespace Samples.DiscoveryServices.ConsoleHost
{
    using System;

    internal class Program
    {
        private static void Main(string[] args)
        {
            RunSelfHosting();
        }

        #region Private Methods

        /// <summary>
        ///     启动服务自托管。
        /// </summary>
        private static void RunSelfHosting()
        {
            Console.WriteLine("The service preparing start...");

            using (CustomizedServiceHost hosting = new CustomizedServiceHost())
            {
                hosting.Open();

                Console.WriteLine("The service was started!");
                Console.ReadLine();
            }
        }

        #endregion Private Methods
    }
}